package com.fire.market.order.service.impl;


import com.fire.component.extension.Assert;
import com.fire.market.order.api.request.OrderCreateParam;
import com.fire.market.order.manager.OrderManager;
import com.fire.market.order.service.OrderQueryCoreService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class OrderQueryCoreServiceImpl implements OrderQueryCoreService {
    @Resource
    OrderManager orderManager;
    @Override
    public String queryPromoToken(OrderCreateParam param) {
        Assert.notNull(param.getPromoId(), "promoId is null");
        Assert.notNull(param.getAmount(), "amount is null");
        Assert.notNull(param.getItemId(), "item id is null");
        Assert.notNull(param.getUserId(), "userId is null");
        return orderManager.queryPromoToken(param.getPromoId(), param.getAmount(), param.getItemId(),param.getUserId());
    }
}
